package com.dnui.seven2.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

/**
 * 
 * @TableName merch
 */
@Data
public class Merch implements Serializable {
    /**
     * 
     */
    @TableId
    private Long merchId;

    /**
     * 
     */
    private String merchName;

    /**
     * 
     */
    private String merchDetails;

    /**
     * 
     */
    private Integer merchPrice;

    /**
     * 
     */
    private String merchImage;

    /**
     * 
     */
    private String merchFeedback;

    /**
     * 
     */
    private String administratorName;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Merch other = (Merch) that;
        return (this.getMerchId() == null ? other.getMerchId() == null : this.getMerchId().equals(other.getMerchId()))
            && (this.getMerchName() == null ? other.getMerchName() == null : this.getMerchName().equals(other.getMerchName()))
            && (this.getMerchDetails() == null ? other.getMerchDetails() == null : this.getMerchDetails().equals(other.getMerchDetails()))
            && (this.getMerchPrice() == null ? other.getMerchPrice() == null : this.getMerchPrice().equals(other.getMerchPrice()))
            && (this.getMerchImage() == null ? other.getMerchImage() == null : this.getMerchImage().equals(other.getMerchImage()))
            && (this.getMerchFeedback() == null ? other.getMerchFeedback() == null : this.getMerchFeedback().equals(other.getMerchFeedback()))
            && (this.getAdministratorName() == null ? other.getAdministratorName() == null : this.getAdministratorName().equals(other.getAdministratorName()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getMerchId() == null) ? 0 : getMerchId().hashCode());
        result = prime * result + ((getMerchName() == null) ? 0 : getMerchName().hashCode());
        result = prime * result + ((getMerchDetails() == null) ? 0 : getMerchDetails().hashCode());
        result = prime * result + ((getMerchPrice() == null) ? 0 : getMerchPrice().hashCode());
        result = prime * result + ((getMerchImage() == null) ? 0 : getMerchImage().hashCode());
        result = prime * result + ((getMerchFeedback() == null) ? 0 : getMerchFeedback().hashCode());
        result = prime * result + ((getAdministratorName() == null) ? 0 : getAdministratorName().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", merchId=").append(merchId);
        sb.append(", merchName=").append(merchName);
        sb.append(", merchDetails=").append(merchDetails);
        sb.append(", merchPrice=").append(merchPrice);
        sb.append(", merchImage=").append(merchImage);
        sb.append(", merchFeedback=").append(merchFeedback);
        sb.append(", administratorName=").append(administratorName);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}